<!--SIF Implementation Specification 2.2-6 (March 17, 2008)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.sifinfo.org/infrastructure/2.x" xmlns:sif="http://www.sifinfo.org/infrastructure/2.x" elementFormDefault="qualified">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="imports/xml/xml.xsd" />
  <xs:complexType name="StudentLEARelationshipType">
    <xs:annotation>
      <xs:documentation>The purpose of the StudentLEARelationship object is to represent the current information available regarding a single student's 
relationship/affiliation to a single LEA for a specific school year as of the time a SIF_Event or SIF_Response is generated 
by the system of record. This object is not designed to operate on a historical/longitudinal basis in the default context.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="MembershipType">
        <xs:annotation>
          <xs:documentation>The type of this affiliation as it relates to the LEA identified in LEAInfoRefId.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="Home">
              <xs:annotation>
                <xs:documentation>The LEA is responsible for reporting the student's membership/child accounting information.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="Concurrent">
              <xs:annotation>
                <xs:documentation>The LEA is not the primary reporting unit for the student's membership/child accounting information.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="Summer">
              <xs:annotation>
                <xs:documentation>A summer school enrollment, not part of the regular school year.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="LEARelationshipType" type="sif:OrganizationRelationshipType">
        <xs:annotation>
          <xs:documentation>An instance of the OrganizationRelationshipType common element that describes the details of the student's affiliation with the LEA.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="EntryDate" type="xs:date">
        <xs:annotation>
          <xs:documentation>The date from when this affiliation is valid.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="EntryType" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Code" type="sif:NCES0619EntryTypeType">
              <xs:annotation>
                <xs:documentation>Code indicating the type of entry for this affiliation.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="OtherCodeList" minOccurs="0" nillable="true" type="sif:OtherCodeListType" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ExitDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:documentation>The last school calendar day (membership day) the student was affiliated with the LEA (inclusive).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ExitType" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Code" type="sif:NCES0644ExitWithdrawalTypeType">
              <xs:annotation>
                <xs:documentation>Code indicating the type of exit for this affiliation.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="OtherCodeList" minOccurs="0" nillable="true" type="sif:OtherCodeListType" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ExitStatus" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Code" type="sif:NCES0643ExitWithdrawalStatusType">
              <xs:annotation>
                <xs:documentation>Code indicating the exit status for this affiliation.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="OtherCodeList" minOccurs="0" nillable="true" type="sif:OtherCodeListType" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="NonResidentAttendReason" minOccurs="0" nillable="true" type="sif:NCES0599NonResidentAttendanceRationaleType">
        <xs:annotation>
          <xs:documentation>Indicates the reason that the student has an affiliation with this LEA if the student is a not a resident of the LEA.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="GradeLevel" minOccurs="0" nillable="true" type="sif:GradeLevelType">
        <xs:annotation>
          <xs:documentation>The grade or academic level of the student.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_Metadata" minOccurs="0" nillable="true" type="sif:SIF_MetadataType" />
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="sif:SIF_ExtendedElementsType" />
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="sif:RefIdType">
      <xs:annotation>
        <xs:documentation>The unique identifier for a particular affiliation between a student and a LEA.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="StudentPersonalRefId" use="required" type="sif:IdRefType">
      <xs:annotation>
        <xs:documentation>The SIF RefId of the StudentPersonal object to which this instance of StudentLEARelationship refers.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="LEAInfoRefId" use="required" type="sif:IdRefType">
      <xs:annotation>
        <xs:documentation>The SIF RefId of the LEAInfo object to which this instance of StudentLEARelationship refers.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="SchoolYear" use="required" type="sif:SchoolYearType">
      <xs:annotation>
        <xs:documentation>Contains the SIF school year to which this instance of StudentLEARelationship applies. StudentLEARelationship must not span multiple school years.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="StudentLEARelationship" type="sif:StudentLEARelationshipType" />

</xs:schema>